<%@ Page Language="C#" MasterPageFile="~/MasterPages/manager/manager.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="manager_Navigation_Default" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
    function refresh()
    {
    document.location.href = "default.aspx#";
    }
    function showNewPageForm()
    {
        document.getElementById('np').style.display = "inline";
    }
    
    function hideNewPageForm()
    {
        document.getElementById('np').style.display = "none";
    }
</script>
    <h2>Site Map</h2>
    <p>Design your website's structure.</p>
    

<asp:Panel id="panelNewNavigation" runat="server" DefaultButton="btnAddToNav"><DIV style="FLOAT: left; WIDTH: auto;margin-bottom:20px;"><B class="rc"><B class="rc1"><B></B></B><B class="rc2"><B></B></B><B class="rc3"></B><B class="rc4"></B><B class="rc5"></B></B><DIV class="rcfg"><!-- content goes here --><B>Define the new site map node</B><BR /><P><LABEL>Text: </LABEL><asp:TextBox id="txtText" runat="server" Width="206px"></asp:TextBox> </P>
<P><LABEL>Links To:</LABEL><asp:RadioButtonList id="radioNavigationType" runat="server" OnSelectedIndexChanged="radioNavigationType_SelectedIndexChanged" AutoPostBack="True" RepeatLayout="Flow" RepeatDirection="Horizontal"><asp:ListItem Value="nothing">Nothing (no menu link)</asp:ListItem>
<asp:ListItem Value="WebPage">Page In Your Website</asp:ListItem>
<asp:ListItem Value="category">Product Category</asp:ListItem>
<asp:ListItem Value="URL">External URL</asp:ListItem>
</asp:RadioButtonList> <asp:Panel id="panelWebPage" runat="server" Visible="False" Width="100%"><LABEL>Select a Page:</LABEL><asp:DropDownList id="ddlTargetID" runat="server" DataValueField="ID" DataTextField="Title" DataSourceID="odsWebPages" AppendDataBoundItems="True"><asp:ListItem Text="Select..."></asp:ListItem>
</asp:DropDownList>&nbsp;<A onclick="showNewPageForm();" href="javascript:void(0);">+ New Page</A><DIV style="DISPLAY: none" id="np"><asp:TextBox id="txtPageTitle" runat="server"></asp:TextBox> 
<asp:Button id="btnCreateNewPage" onclick="btnCreateNewPage_Click" runat="server" Text="Create"></asp:Button> </DIV><asp:ObjectDataSource id="odsWebPages" runat="server" TypeName="TanashCMS.Business.WebPage" SelectMethod="List" OnSelecting="odsWebPages_Selecting" OldValuesParameterFormatString="original_{0}">
                    <SelectParameters>
                        <asp:ProfileParameter Name="WebsiteID" PropertyName="WebsiteID" Type="Int32" />
                        <asp:Parameter DefaultValue="True" Name="Recursive" Type="Boolean" />
                    </SelectParameters>
                    </asp:ObjectDataSource> </asp:Panel> <asp:Panel id="panelExternalURL" runat="server" Visible="False" Width="100%">
                    <label>URL:</label><asp:TextBox ID="txtURL" runat="server" Columns="30">http://</asp:TextBox>
                </asp:Panel> <asp:Panel id="panelCategory" runat="server" Visible="false">Choose Category: <asp:DropDownList id="ddlSelectCategory" runat="server" DataValueField="ID" DataTextField="Title" DataSourceID="odsCategories" AppendDataBoundItems="True"><asp:ListItem Value="">Select...</asp:ListItem>
</asp:DropDownList> 
<asp:ObjectDataSource id="odsCategories" runat="server" TypeName="TanashCMS.Business.Category" SelectMethod="List" OldValuesParameterFormatString="original_{0}"><SelectParameters>
<asp:ProfileParameter PropertyName="WebsiteID" Type="Int32" Name="WebsiteID"></asp:ProfileParameter>
<asp:Parameter Type="Boolean" DefaultValue="true" Name="Recursive"></asp:Parameter>
</SelectParameters>
</asp:ObjectDataSource>
</asp:Panel> </P><P><LABEL>Position:</LABEL><asp:RadioButtonList id="radioPosition" runat="server" OnSelectedIndexChanged="radioPosition_SelectedIndexChanged" AutoPostBack="true" RepeatLayout="Flow" RepeatDirection="Horizontal">
                    <asp:ListItem Text="Top Level" Value="root"></asp:ListItem>
                    <asp:ListItem Text="Child Of:" Value="child"></asp:ListItem>
                    </asp:RadioButtonList> <asp:DropDownList id="ddlPosition" runat="server" OnDataBinding="ddlPosition_DataBinding" Enabled="False"></asp:DropDownList></P><asp:Button id="btnAddToNav" onclick="btnAddToNav_Click" runat="server" Text="Create Node and Add To Site Map" Enabled="False"></asp:Button> <asp:Button id="btnCancelAddToNav" runat="server" Text="Cancel" OnClick="btnCancelAddToNav_Click"></asp:Button> </DIV><B class="rc"><B class="rc5"></B><B class="rc4"></B><B class="rc3"></B><B class="rc2"><B></B></B><B class="rc1"><B></B></B></B></DIV></asp:Panel>


    <div style="height:20px;width:100%;float:left;"></div>
            <div style="float:left;width:100%;white-space:nowrap;">
          <div style="width:auto;float:left;">
              <b class="rc">
              <b class="rc1"><b></b></b>
              <b class="rc2"><b></b></b>
              <b class="rc3"></b>
              <b class="rc4"></b>
              <b class="rc5"></b></b>

              <div class="rcfg">
                <!-- content goes here -->

                    <b>Site Navigation</b>&nbsp;&nbsp;
                    <asp:GridView runat="server" ID="gridNavigation" 
                            onrowdeleting="gridNavigation_RowDeleting" DataKeyNames="ID" AutoGenerateColumns="false" Width="400">
                        <Columns>
                            <asp:BoundField DataField="Title" />
                            <asp:CommandField ShowDeleteButton="True" />
                        </Columns>
                    </asp:GridView>
              </div>

              <b class="rc">
              <b class="rc5"></b>
              <b class="rc4"></b>
              <b class="rc3"></b>
              <b class="rc2"><b></b></b>
              <b class="rc1"><b></b></b></b>
            </div>
                
          <div style="width:auto;float:left;margin-left:20%;">
              <b class="rc">
              <b class="rc1"><b></b></b>
              <b class="rc2"><b></b></b>
              <b class="rc3"></b>
              <b class="rc4"></b>
              <b class="rc5"></b></b>

              <div class="rcfg">
                <!-- content goes here -->
                    <b>Site Navigation Menu Preview</b>
                    <asp:Menu ID="menuPreview" runat="server" BackColor="#B5C7DE" DynamicHorizontalOffset="2"
                        DynamicPopOutImageUrl="~/manager/images/black-down-arrow.gif" Font-Names="Verdana"
                        Font-Size="0.8em" ForeColor="#284E98" OnDataBinding="menuPreview_DataBinding"
                        Orientation="Horizontal" StaticPopOutImageUrl="~/manager/images/black-down-arrow.gif"
                        StaticSubMenuIndent="10px">
                        <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <DynamicHoverStyle BackColor="#284E98" ForeColor="White" />
                        <DynamicMenuStyle BackColor="#B5C7DE" />
                        <DynamicItemTemplate>
                            <%# Eval("Text") %>
                        </DynamicItemTemplate>
                        <StaticSelectedStyle BackColor="#507CD1" />
                        <DynamicSelectedStyle BackColor="#507CD1" />
                        <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
                    </asp:Menu>

              </div>

              <b class="rc">
              <b class="rc5"></b>
              <b class="rc4"></b>
              <b class="rc3"></b>
              <b class="rc2"><b></b></b>
              <b class="rc1"><b></b></b></b>
            </div>
            </div> 
</asp:Content>

